<template>
    <div class="list">
        <table border="1" cellspacing="0" align=center>
            <tr>
                <td>#</td>
                <td>商品名称</td>
                <td>商品价格</td>
                <td>商品标签</td>
                <td>操作</td>
            </tr>
              <tr v-for="val,i in arr" :key="i">
                <td>{{i+1}}</td>
                <td>{{val.name}}</td>
                <td>{{val.price}}</td>
                <td>
                    <slot name="tag" :val="val" :i="i"></slot>
                </td>
                <td>
                    <slot name="delete"  :i="i"></slot>
                </td>
            </tr>
        </table>
    </div>
</template>

<script>
export default {
    name: 'List',
    props:["arr"],
    data() {
        return {
            
        };
    },

    mounted() {
        
    },

    methods: {
        
    },
};
</script>

<style scoped>

</style>